<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博客系统</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }

        .container {
            width: 300px;
            margin: 100px auto;
            background-color: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .container h2 {
            text-align: center;
        }

        .container input {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            box-sizing: border-box;
        }

        .container button {
            width: 100%;
            padding: 10px;
            background-color: #333;
            color: #fff;
            border: none;
            cursor: pointer;
        }

        .container button:hover {
            background-color: #555;
        }
    </style>
</head>

<body>
    <div class="container">
        <form action="http://localhost:3000/login" method="get">
            <h2>登录</h2>
            <input type="text" id="loginUsername" placeholder="用户名" name="username">
            <input type="password" id="loginPassword" placeholder="密码" name="password">
            <button id="loginBtn">登录</button>
        </form>

    </div>
    <div class="container">
        <h2>注册</h2>
        <input type="text" id="registerUsername" placeholder="用户名">
        <input type="password" id="registerPassword" placeholder="密码">
        <button id="registerBtn">注册</button>
    </div>

    <script src="jquery.min.js"></script>
    <script>
        // $(function () {
        //     $("#loginBtn").click(function () {
        //         var username = $("#loginUsername").val();
        //         var password = $("#loginPassword").val();
        //         // 这里可以添加AJAX请求到后端进行用户验证
        //         alert("登录用户: " + username);
        //     });

        //     $("#registerBtn").click(function () {
        //         var username = $("#registerUsername").val();
        //         var password = $("#registerPassword").val();
        //         // 这里可以添加AJAX请求到后端进行用户注册
        //         alert("注册用户: " + username);
        //     });
        // });
    </script>
</body>

</html>